New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the ckanext template #1956
Conversation
By the way this tags the CKAN extension it generates with keyword CKAN on PyPI: https://pypi.python.org/pypi?%3Aaction=search&term=ckan&submit=search (although they're all called ckanext-something anyway) |
@johnmartin I think you had some ideas about a template for frontend stuff for extensions? That could be added to this, after this is merged. I think it's good to use the existing template because it's in the core repo, documented in the extension and theming tutorials, and its a proper template with Jinja2 rendering. |
@joetsoi Can you be sure to test this out for me? Create a test extension, actually publish it to github and pypi, test that travis and coveralls work, test that pip installing it and starting ckan works.. |
# If there are data files included in your packages that need to be | ||
# installed, specify them here. If using Python 2.6 or less, then these | ||
# have to be included in MANIFEST.in as well. | ||
include_package_data=True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a comma here after True
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, fixing...
I've re-tested this and everything seems to work. One thing I could add is instructions for how to publish the project to GitHub (like it has instructions for how to put it on PyPI). But I don't think it's really necessary so I'm happy for it to be merged as-is |
Bump. I believe the build is passing on travis |
Reminder to self, add http://badge.fury.io/ or https://pypip.in/ badges to this |
var('license_name', 'License name'), | ||
var('description', 'a one-line description of the extension, ' | ||
'for example: "A simple blog extension for CKAN"'), | ||
var('author', 'for example: "Guybrush Threepwood"'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brilliant.
@joetsoi ping |
Add Travis, Coveralls, PyPI, tests, README, gitignore, LICENSE, etc. to the CKAN extension template that gets rendered when you do
paster --plugin=ckan create -t ckanext
.I've been doing all this stuff manually for every new extension so this is going to save me some time, will hopefull encourage the general extension writing community to have good practices as well.
Also changed the template to use Jinja2 everywhere.
Example output:
https://github.com/ckan/ckanext-eurovoc
https://pypi.python.org/pypi/ckanext-eurovoc
(Not sure why the rst isn't rendering on pypi though)